﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace LoA.Shared {
	public struct AnimationStructure {
		private int id;
		public Matrix root { get { return (this.roots != null ? this.roots[id] : default(Matrix)); } }
		public Matrix[ ] transform { get { return (this.roots != null ? this.transforms[id] : null); } }
		public Matrix[ ] roots;
		public Matrix[ ][ ] transforms;

		public void Update(GameTime gameTime) {
			if (roots != null) {
				var time = (int)gameTime.TotalGameTime.TotalMilliseconds;
				if (time % 3 == 0) {
					id++;
					id %= roots.Length;
				}
			}
		}
	}
}
